package com.topisv.tms.repository.workBox;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.workBox.WorkBox;

/**
 * 流转箱_DAO
 * @author ch
 *
 */
public abstract interface WorkBoxDao extends PagingAndSortingRepository<WorkBox, Long>, JpaSpecificationExecutor<WorkBox>
{

	@Query("select t from WorkBox t where t.boxCode=? and t.warehouseCode=?")
	WorkBox loadByBoxCode(String workBoxCode,String warehouseCode);

	@Query("select t from WorkBox t where t.boxCode=?")
	WorkBox loadByBoxCode(String boxCode);

}